using DeclarativeTest.Core.Attributes;

namespace DeclarativeTest.Core.Support
{
	/// <summary>
	/// Provides default implementation for <see cref="IActionProvider"/>
	/// <remarks>
	/// Uses <see cref="DefaultActionFactory"/> that registers all action by <see cref="ActionAttribute"/>
	/// </remarks>
	/// </summary>
	public abstract class BaseActionProvider : IActionProvider
	{
		#region Implementation of IActionProvider

		/// <summary>
		/// Gets XmlSchema locations
		/// </summary>
		/// <returns>list of locations</returns>
		public abstract string[] GetSchemaLocations( );

		/// <summary>
		/// Gets <see cref="IActionFactory"/>
		/// </summary>
		/// <returns><see cref="IActionFactory"/></returns>
		public virtual IActionFactory GetActionFactory( )
		{
			return new DefaultActionFactory( GetType().Assembly );
		}

		#endregion
	}
}